// The Vue build version to load with the `import` command
// (runtime-only or standalone) has been set in webpack.base.conf with an alias.
import Vue from 'vue'
import App from './App'
import router from './router'
import YDUI from 'vue-ydui';
import instance from './api/index-client'
// import 'vue-ydui/dist/ydui.rem.css';
import 'vue-ydui/dist/ydui.px.css';

Vue.use(YDUI);
Vue.config.productionTip = false
Vue.prototype.axios = instance

Vue.directive('title', {
    inserted: function(el, binding) {
        document.title = el.innerText
        el.remove()
    }
})

/* eslint-disable no-new */
new Vue({
    el: '#app',
    router,
    instance,
    template: '<App/>',
    components: { App }
})